package com.deng.template.web.api.impl;

import com.alibaba.fastjson2.JSON;
import com.deng.template.common.model.CnResult;
import com.deng.template.web.api.UserApi;
import com.deng.template.web.model.request.UserLoginReq;
import com.deng.template.web.model.response.UserLoginResp;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Deng
 * @describe
 * @date 2022/11/13
 */
@Slf4j
@RestController
@RequestMapping("/user")
public class UserApiImpl implements UserApi {

    @Override
    @PostMapping("/login")
    public CnResult<UserLoginResp> login(UserLoginReq request) {
        log.info(JSON.toJSONString(request));
        return CnResult.ofSuccess(null);
    }
}
